package com.tobeface.wechat.message;

/**
 * @author loudyn
 */
public interface WeChatMessageHandler extends Comparable<WeChatMessageHandler> {

    public static final int HIGH_PRIORITY = 99;
    public static final int MEDIUM_PRIORITY = HIGH_PRIORITY >> 1;
    public static final int LOW_PRIORITY = MEDIUM_PRIORITY >> 1;

    /**
     * @param message
     * @return
     */
    boolean isSupport(WeChatMessage message);

    /**
     * @return
     */
    int getPriority();

    /**
     * @param message
     * @return
     */
    void messageReceived(WeChatMessageContext context, WeChatMessage message);
}
